package com.bo.mybasedemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.bo.libnet.net.ApiCall;
import com.bo.libnet.net.ApiCallBack;
import com.bo.mybasedemo.R;
import com.bo.mybasedemo.bean.BookBean;
import com.bo.mybasedemo.net.ApiSeverce;
import com.orhanobut.logger.Logger;

import retrofit2.Call;
import retrofit2.Response;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        Logger.i("start init");
        Call<BookBean> userInfo = ApiCall.getSeverceApi(ApiSeverce.class).getBookList("番茄工作",0,1);
        ApiCall.newInstance(this).enquene(userInfo, new ApiCallBack<BookBean>() {
            @Override
            public void onSuccess(Call<BookBean> call, Response<BookBean> response) {

            }

            @Override
            public void onFail(Call<BookBean> call, Throwable t) {

            }
        });
    }
}
